package com.Entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * CommentInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "commentInfo", catalog = "smartsofa")
public class CommentInfo implements java.io.Serializable {

	// Fields

	private Integer commentId;
	private Integer topicId;
	private Integer userId;
	private String comment;
	private String imgUrl;
	private Timestamp commentTime;
	private Integer floorNum;

	// Constructors

	/** default constructor */
	public CommentInfo() {
	}

	/** full constructor */
	public CommentInfo(Integer topicId, Integer userId, String comment,
			String imgUrl, Timestamp commentTime, Integer floorNum) {
		this.topicId = topicId;
		this.userId = userId;
		this.comment = comment;
		this.imgUrl = imgUrl;
		this.commentTime = commentTime;
		this.floorNum = floorNum;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "commentId", unique = true, nullable = false)
	public Integer getCommentId() {
		return this.commentId;
	}

	public void setCommentId(Integer commentId) {
		this.commentId = commentId;
	}

	@Column(name = "topicId")
	public Integer getTopicId() {
		return this.topicId;
	}

	public void setTopicId(Integer topicId) {
		this.topicId = topicId;
	}

	@Column(name = "userId")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "comment", length = 4000)
	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Column(name = "imgUrl", length = 200)
	public String getImgUrl() {
		return this.imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	@Column(name = "commentTime", length = 8)
	public Date getCommentTime() {
		return this.commentTime;
	}

	public void setCommentTime(Timestamp commentTime) {
		this.commentTime = commentTime;
	}

	@Column(name = "floorNum")
	public Integer getFloorNum() {
		return this.floorNum;
	}

	public void setFloorNum(Integer floorNum) {
		this.floorNum = floorNum;
	}

}